[IA64] Remove unused and unwritten active_mm field of vcpu and domain.
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 10 Mar 2006 17:00:31 +0000 (10:00 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 10 Mar 2006 17:00:31 +0000 (10:00 -0700)
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/asm-offsets.c
xen/arch/ia64/linux-xen/setup.c
xen/arch/ia64/linux-xen/smp.c
xen/include/asm-ia64/domain.h
xen/include/asm-ia64/linux-xen/asm/tlbflush.h

index 88f49e7745b646009c19981c7d51b82bcf4edb50..6918bd82c41b32478555d4ab43c29b9b13f715d5 100644 (file)
@@ -84,7 +84,6 @@ void foo(void)
        //DEFINE(IA64_TASK_SIGHAND_OFFSET,offsetof (struct task_struct, sighand));
        //DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal));
        //DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid));
-       DEFINE(IA64_PGD, offsetof(struct domain, arch.mm));
        DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct vcpu, arch._thread.ksp));
        DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct vcpu, arch._thread.on_ustack));
 
index d99fd197087be7927a33cc60f1b239daacd662fa..ac75b8614217d87e8438167b566f16e114b5daf3 100644 (file)
@@ -842,7 +842,9 @@ cpu_init (void)
                                        | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
 #endif
        atomic_inc(&init_mm.mm_count);
+#ifndef XEN
        current->active_mm = &init_mm;
+#endif
 #ifdef XEN
        if (current->domain->arch.mm)
 #else
index d667a428b44a394aaaa8c81871b7baca2831d315..53bfa861249d3526c2b2dcc4567cfd77c4df03b2 100644 (file)
@@ -296,7 +296,12 @@ smp_flush_tlb_mm (struct mm_struct *mm)
 {
        preempt_disable();
        /* this happens for the common case of a single-threaded fork():  */
+#ifdef XEN
+       if (likely(mm == current->domain->arch.mm
+                  && atomic_read(&mm->mm_users) == 1))
+#else
        if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1))
+#endif
        {
                local_finish_flush_tlb_mm(mm);
                preempt_enable();
index 4ac050da1a81330c84f1d859ab6b3317e6afa93f..20da8cde393ffaa27c50819c672214c967f670b7 100644 (file)
@@ -14,7 +14,6 @@
 extern void domain_relinquish_resources(struct domain *);
 
 struct arch_domain {
-    struct mm_struct *active_mm;
     struct mm_struct *mm;
     unsigned long metaphysical_rr0;
     unsigned long metaphysical_rr4;
@@ -68,7 +67,6 @@ struct arch_vcpu {
     int breakimm;                      // from arch_domain (so is pinned)
     int starting_rid;          /* first RID assigned to domain */
     int ending_rid;            /* one beyond highest RID assigned to domain */
-    struct mm_struct *active_mm;
     struct thread_struct _thread;      // this must be last
 
     thash_cb_t *vtlb;
@@ -81,7 +79,6 @@ struct arch_vcpu {
     struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
 };
 
-#define active_mm arch.active_mm
 //#define thread arch._thread
 
 // FOLLOWING FROM linux-2.6.7/include/sched.h
index 38f7318f6c031af96481dc429a9f19e60ea3276b..7397882c0f8323337935b4e863248158cd1fa9c5 100644 (file)
@@ -79,8 +79,12 @@ flush_tlb_page (struct vm_area_struct *vma, unsigned long addr)
 {
 #ifdef CONFIG_SMP
        flush_tlb_range(vma, (addr & PAGE_MASK), (addr & PAGE_MASK) + PAGE_SIZE);
+#else
+#ifdef XEN
+       if (vma->vm_mm == current->domain->arch.mm)
 #else
        if (vma->vm_mm == current->active_mm)
+#endif
                ia64_ptcl(addr, (PAGE_SHIFT << 2));
 #ifndef XEN
 // FIXME SMP?